using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace hao_Dto.User
{
    /// <summary>
    /// 管理员创建用户数据传输对象
    /// </summary>
    public class CreateUserDto
    {
        [Required(ErrorMessage = "用户名不能为空")]
        [StringLength(50, ErrorMessage = "用户名长度不能超过50个字符")]
        public string UserName { get; set; }
        [StringLength(50, ErrorMessage = "昵称长度不能超过50个字符")]
        public string? Nickname { get; set; }
        
        [Required(ErrorMessage = "密码不能为空")]
        [StringLength(100, MinimumLength = 6, ErrorMessage = "密码长度必须在6-100个字符之间")]
        public string Password { get; set; }
        
        [Phone(ErrorMessage = "手机号格式不正确")]
        public string Phone { get; set; }
        
        [EmailAddress(ErrorMessage = "邮箱格式不正确")]
        public string Email { get; set; }
        
        public int Status { get; set; } = 1; // 默认状态为正常
        public int? Gender { get; set; }      // 性别：0-未知，1-男，2-女
        public List<Guid> RoleIds { get; set; } = new List<Guid>(); // 角色ID列表
        public string Avatar { get; set; }    // 头像
    }
}
